<script>
	export default {
		onLaunch: function() {
			uni.getSystemInfo({
				success: e => {
					let StatusBar = e.statusBarHeight;
					let rect = wx.getMenuButtonBoundingClientRect();
					if(!rect){
						return
					}
					if (e.system.toLowerCase().indexOf('ios') > -1) {
						//IOS  
						let CustomBar = rect.bottom + (rect.top - e.statusBarHeight) * 2;
						let HeaderBar = CustomBar - e.statusBarHeight;
						this.$store.state.customBarHeight = CustomBar
						this.$store.state.headerBarHeight = HeaderBar
					} else {
						//安卓  
						let HeaderBar = rect.height + (rect.top - e.statusBarHeight) * 2;
						let CustomBar = HeaderBar + e.statusBarHeight;
						this.$store.state.customBarHeight = CustomBar
						this.$store.state.headerBarHeight = HeaderBar
					}
				}
			});
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style>
	/*每个页面公共css */
	uni-page-body,
	page {
		height: 100%;
	}
</style>
